package ooday02test;

public class Student extends Person{
    public String className;
    public String stuId;
    //构造方法

    public Student() {
    }

    public Student(String name, int age, String address, String className, String stuId) {
        super(name, age, address);
        this.className = className;
        this.stuId = stuId;
    }
    //重写方法sayHi()
    public void sayHi(){
        System.out.println("我是学生，我的名字叫"+name+"，今年"+age+"岁了，住在"+address+"，班名为"+className+"，学号是"+stuId);
    }
    //特有方法
    public void study(){
        System.out.println(name+"学生，在学习");
    }
}
